package betandregret;

import java.text.DateFormat;
import java.util.Calendar;
import java.util.Locale;

public abstract class Time {

	public static String formatToString(Calendar datum) {
		
		StringBuilder sb = new StringBuilder();
		DateFormat date = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.GERMAN);
		sb.append(date.format(datum.getTime()));
		sb.append(" um ");
		DateFormat time = DateFormat.getTimeInstance(DateFormat.SHORT, Locale.GERMAN);
		sb.append(time.format(datum.getTime()));
		sb.append(" Uhr");

		return sb.toString();
	}
}
